package com.test.springboot3.springboot3testdemo1.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 *
 * @author： liuziyang
 * @date： 2024/8/6-下午12:10
 * @description：
 * @modifiedBy：
 * @version: 1.0
 */
@Slf4j
@Service
public class CacheService {
  @Cacheable(value = "calc")
  public int multiply(int a, int b) {
    int c = a * b;
    log.info("calculate: {}*{}={}", a, b, c);
    return c;
  }
}
